package com.example.myfirst.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 购物车(Shopcart)表实体类
 *
 * @author makejava
 * @since 2023-12-16 21:38:42
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("shopcart")
public class ShopCart extends Model<ShopCart> implements Serializable {
    //购物车id
    @TableId(type = IdType.AUTO)
    private Integer shopcartId;
    //商品id
    private Integer goodsId;
    // 临时添加-->商品信息
    @TableField(exist = false)
    private Goods goods;
    //用户id
    private Integer userId;
    //购买的总数量
    private Integer num;
}

